package com.uzai.console.web.takebal;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.console.annotation.SystemLogType;
import com.uzai.console.dto.takebal.takebalblacklist.TakeBalBlacklistIdDto;
import com.uzai.console.dto.takebal.takebalblacklist.TakeBalBlacklistIdListDto;
import com.uzai.console.dto.takebal.takebalblacklist.TakeBalBlacklistInfoDto;
import com.uzai.console.dto.takebal.takebalblacklist.TakeBalBlacklistQuery;
import com.uzai.console.enums.OperationTypeEnum;
import com.uzai.console.enums.SystemModelEnum;
import com.uzai.console.service.takebal.TakeBalBlacklistService;
import com.uzai.console.vo.takebal.takebalblacklist.TakeBalBlacklistInfoVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 提现管理|提现黑名单
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "提现黑名单",tags = "提现管理|提现黑名单")
@ApiSort(16)
@RestController
public class TakeBalBlacklistController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(TakeBalBlacklistController.class);

    @Autowired
    private TakeBalBlacklistService takeBalBlacklistService;

    @ApiOperation(value = "分页查询提现黑名单列表", notes = "分页查询提现黑名单列表", response = TakeBalBlacklistInfoVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/takeBalBlacklist/findTakeBalBlacklistList")
    public Object findTakeBalBlacklistList(@RequestBody TakeBalBlacklistQuery takeBalBlacklistQuery){
        return takeBalBlacklistService.findTakeBalBlacklistList(takeBalBlacklistQuery);
    }

    @SystemLogType(model = SystemModelEnum.TakeBalBlacklist, type = OperationTypeEnum.ADD)
    @ApiOperation(value = "添加提现黑名单", notes = "添加提现黑名单")
    @ApiOperationSupport(order = 2)
    @PostMapping("/takeBalBlacklist/addTakeBalBlacklist")
    public Object addTakeBalBlacklist(@RequestBody TakeBalBlacklistInfoDto takeBalBlacklistInfoDto){
        takeBalBlacklistService.addTakeBalBlacklist(takeBalBlacklistInfoDto);
        return true;
    }

    @SystemLogType(model = SystemModelEnum.TakeBalBlacklist, type = OperationTypeEnum.DELETE)
    @ApiOperation(value = "删除提现黑名单", notes = "删除提现黑名单")
    @ApiOperationSupport(order = 3)
    @PostMapping("/takeBalBlacklist/deleteTakeBalBlacklist")
    public Object deleteTakeBalBlacklist(@RequestBody TakeBalBlacklistIdDto takeBalBlacklistIdDto){
        takeBalBlacklistService.deleteTakeBalBlacklist(takeBalBlacklistIdDto);
        return true;
    }

    @SystemLogType(model = SystemModelEnum.TakeBalBlacklist, type = OperationTypeEnum.DELETE)
    @ApiOperation(value = "批量删除提现黑名单", notes = "批量删除提现黑名单")
    @ApiOperationSupport(order = 3)
    @PostMapping("/takeBalBlacklist/deleteTakeBalBlacklist/batch")
    public Object batchDeleteTakeBalBlacklist(@RequestBody TakeBalBlacklistIdListDto takeBalBlacklistIdListDto){
        takeBalBlacklistService.batchDeleteTakeBalBlacklist(takeBalBlacklistIdListDto);
        return true;
    }


}
